<%@ Page Inherits="System.Web.UI.MobileControls.MobilePage" Language="VB" %>
<%@ Register TagPrefix="mobile" Namespace="System.Web.UI.MobileControls" Assembly="System.Web.Mobile" %>

<script runat="server">

public Sub Page_Load(o As Object, e As EventArgs)
   if (IsPostBack = false) then
      birthdayCal.SelectedDate = new DateTime(2001, 9, 17)
      birthdayCal.VisibleDate = birthdayCal.SelectedDate
   end if
end sub

public Sub birthdayCal_selectionChanged(sender As Object, _
                                        e As System.EventArgs)
   confirmLabel.Text = "Your birthday is " & _
                       birthdayCal.SelectedDate.Month.ToString() & "/" & _
                       birthdayCal.SelectedDate.Day.ToString() & "?"
   ActiveForm = confirm
end sub

</script>

<mobile:Form runat="server" id="calendar">
   When is your birthday?
   <mobile:Calendar runat="server" id="birthdayCal"
                    OnSelectionChanged="birthdayCal_selectionChanged"/>
</mobile:Form>

<mobile:Form runat="server" id="confirm">
   <mobile:Label runat="server" id="confirmLabel"/>
   <mobile:Link runat="server" NavigateURL="#done" Text="Yes"/>
   <mobile:Link runat="server" NavigateURL="#calendar" Text="No"/>
</mobile:Form>

<mobile:Form runat="server" id="done">
   Done.
</mobile:Form>
